<include file="Public/header"/>

<div class="x-nav">
      <span class="layui-breadcrumb">

      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so" action="{:U('')}" method="get">
           <div class="layui-input-inline">
            <select name="status">
              <option value="0" selected='selected'>记录状态</option>
              <option value="1" <if condition=" $status eq 1"> selected='selected' </if>>未处理</option>
              <option value="2" <if condition=" $status eq 2"> selected='selected' </if>>已处理</option>
            </select>
          </div>
          <input type="text" value="{:I('name')}" name="name"  placeholder="请输入姓名" autocomplete="off" class="layui-input">
          <input type="text" value="{:I('mobile')}" name="mobile"  placeholder="请输入手机号" autocomplete="off" class="layui-input">
          <button class="layui-btn"   type="submit" ><i class="layui-icon">&#xe615;</i></button>
          <button class="layui-btn"   type="reset" >清空</button>
        </form>
      </div>
      <xblock>
        <button class="layui-btn layui-bg-red" onclick="delAll('','{:U('del')}')"><i class="layui-icon"></i>永久删除</button>
        <button class="layui-btn layui-bg-green" onclick="issetAll('','{:U('isagree')}')">批量同意</button>
        <button class="layui-btn layui-bg-blue" onclick="issetAll('','{:U('isnotagree')}')">批量拒绝</button>
        <span class="x-right" style="line-height:40px">共有数据：{$count} 条</span>
      </xblock>
      <table class="layui-table">
        <thead>
          <tr>
            <th>
              <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th style="width:50px;">ID</th>
            <th style="width:70px;">姓名</th>
            <th style="width:90px;">手机号</th>
            <th>头像</th>
            <th>申请时间</th>
            <th>微信号</th>
            <th>粉丝数</th>
            <th style="width:160px;">备注说明</th>
            <th>小区名称</th>
            <th>账号状态</th>
            <th>记录状态</th>
            <th>操作</th>
            </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
          <tr>
            <td>
              <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id={$vo['id']}><i class="layui-icon">&#xe605;</i></div>
            </td>
            <td>{$vo['id']}</td>
            <td>{$vo['name']}</td>
            <td>{$vo['mobile']}</td>
            <td><img src="{$vo['acv']}" style="width: 40px"></td>
            <td><if condition="$vo.addtime neq null">{$vo['addtime']|date='Y-m-d H:i:s',###}</if></td>
            <td>{$vo["weixin"]}</td>
            <td>{$vo["fenshi"]}</td>
            <td>{$vo["memo"]}</td>
            <td>{$vo["xiaoquname"]}</td>
            <td><if condition='$vo["zstatus"] eq 1'>正常<else/>冻结</if></td>
            <td>
            	<if condition='$vo["status"] eq 1'><font color='blue'>未处理</font></if>
            	<if condition='$vo["status"] eq 2'><font color='green'>已同意</font></if>
            	<if condition='$vo["status"] eq 3'><font color='red'>已拒绝</font></if>
           	</td>
           	<td>
           	<if condition="$vo.status eq 1">
           	  <a title="同意" class="layui-btn layui-btn-xs"  onclick="setStatus(this,'{$vo['id']}','{:U("isagree")}')" href="javascript:;">
                    同意
              </a>

              <a title="拒绝"  class="layui-btn layui-btn-warm layui-btn-xs" onclick="setStatus(this,'{$vo['id']}','{:U("isnotagree")}')" href="javascript:;">
                    拒绝
              </a>
            <else/>
            -  
            </if>  
           	  </td>

          </tr>
        </volist>


        </tbody>
      </table>
      <div class="page" id="page">
        {$page}
      </div>

    </div>
    <script>
    function issetAll(argument,url){
	    var data = tableCheck.getData();
	    
	    layer.confirm('确认要这样操作吗？',function(index){

	        if(data == false || data=='undefined'){
	            layer.msg('参数错误',{icon:5});
	            return false;
	        }
	        $.post(url,{id:data},function (res) {
	            if(res.code){
	                layer.msg(res.msg,{icon:5});
	            }else{

	                layer.msg('操作成功', {icon: 1});
	                location.replace(location.href);
	            }

	        })

	    });
  }


    </script>

<include file="Public/footer"/>

